package com.hoshiicloud.common.constant;

public enum OrderInfoRefundStatusEnum {

    NO_NEED_REFUND(0, "无需退款"),
    NOT_REFUND(1, "未退款"),
    PART_REFUND(2, "已部分退款"),
    ALL_REFUND(3, "已全部退款"),

    ;

    private int code;

    private String name;

    OrderInfoRefundStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return this.code;
    }

    public String getName() {
        return this.name;
    }

    public static OrderInfoRefundStatusEnum get(int code) {
        for (OrderInfoRefundStatusEnum aparameterStatus : values()) {
            if (aparameterStatus.getCode() == code) {
                return aparameterStatus;
            }
        }
        return null;
    }

    public static String getName(int code) {
        for (OrderInfoRefundStatusEnum aparameterStatus : values()) {
            if (aparameterStatus.getCode() == code) {
                return aparameterStatus.getName();
            }
        }
        return null;
    }
}
